//
//  CheckTableViewController.m
//  11210
//
//  Created by student on 16/3/4.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "CheckTableViewController.h"
@interface CheckTableViewController ()
@property(nonatomic,strong)NSArray *list;
//@property(nonatomic,strong)NSIndexPath *lastIndexPath;
@property(nonatomic,strong)NSMutableArray *mArr;

@end

@implementation CheckTableViewController

-(NSMutableArray *)mArr{
    if (_mArr==nil) {
        _mArr=[NSMutableArray array];
    }
    return _mArr;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.list=@[@"Who Hash",
                @"Bubba Gump Shrimp Étouffée", @"Who Pudding", @"Scooby Snacks",
                @"Everlasting Gobstopper", @"Green Eggs and Ham", @"Soylent Green",
                @"Hard Tack", @"Lembas Bread", @"Roast Beast", @"Blancmange",@"Who Hash",
                @"Bubba Gump Shrimp Étouffée", @"Who Pudding", @"Scooby Snacks",
                @"Everlasting Gobstopper", @"Green Eggs and Ham", @"Soylent Green",
                @"Hard Tack", @"Lembas Bread", @"Roast Beast", @"Blancmange"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
   }



#pragma mark - Table view data source



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return self.list.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    cell.textLabel.text=self.list[indexPath.row];
//    if (self.lastIndexPath.row==indexPath.row) {
//        cell.accessoryType=UITableViewCellAccessoryCheckmark;
//    }else{
//        cell.accessoryType=UITableViewCellAccessoryNone;
//    }
    return cell;

}
//-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//    if (self.mArr containsObject:@(indexPath.row)) {
//        self.mArr remov
//    }
//    UITableViewCell *lastCell=[tableView cellForRowAtIndexPath:self.lastIndexPath];
//    lastCell.accessoryType=UITableViewCellAccessoryNone;
//    UITableViewCell *Cell=[tableView cellForRowAtIndexPath:indexPath];
//    Cell.accessoryType=UITableViewCellAccessoryCheckmark;
//    self.lastIndexPath=indexPath;
//    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
//}



@end
